package com.apes.enquiry.supplier.santouliubi.repository;

import com.apes.enquiry.supplier.santouliubi.model.SantouEnquiry;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 类描述：
 *
 * @ClassName ShopManagementRepository
 * @Description 描述
 * @Author wushilong
 * @Date 2022/12/13 19:14
 * @Version 1.0
 */
public interface SantouEnquiryRepository extends CustomRepository<SantouEnquiry, String> {

    @Query(value = "SELECT category_id FROM sp_category_contrast WHERE erp_id = :categoryId AND thirdparty_id='160'", nativeQuery = true)
    List findSantouId(String categoryId);

    @Query(value = "SELECT category_id FROM sp_category_contrast WHERE name LIKE :name  AND thirdparty_id='160'", nativeQuery = true)
    List findLikeSantouId(String name);
}
